package IO;

import java.io.*;

public class Hclkbwj1 {
    public static void main(String[] args) throws IOException {
        //字符缓冲流标准代码
        BufferedReader br=new BufferedReader(new FileReader("Libs/1.txt"));
        BufferedWriter bw=new BufferedWriter(new FileWriter("Libs/2.txt"));
        int len;
        while ((len = br.read()) != -1) {
            bw.write(len);
        }
        br.close();
        bw.close();
        /*
        //字符缓冲流数组对象
        BufferedReader br=new BufferedReader(new FileReader("Libs/1.txt"));
        BufferedWriter bw=new BufferedWriter(new FileWriter("Libs/2.txt"));
        char [] chs=new char[1024];
        int len;
        while ((len = br.read(chs)) != -1) {
            bw.write(chs,0,len);
        }
        br.close();
        bw.close();
         */
    }
}
